//
//  PostView.h
//  TwitterFon
//
//  Created by kaz on 10/25/08.
//  Copyright 2008 naan studio. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Status.h"
#import "FriendGroup.h"

@interface PostView : UIView {
    IBOutlet UITextView*        text;
    IBOutlet UILabel*           to;
    IBOutlet UITextField*       recipient;
    IBOutlet UIToolbar*         toolbar;
    IBOutlet UIBarButtonItem*   locationButton;
    IBOutlet UIBarButtonItem*   photoButton;
    IBOutlet UIBarButtonItem*   friendButton;
    IBOutlet UIBarButtonItem*   trashButton;
    IBOutlet UIBarButtonItem*   sendButton;
    IBOutlet UILabel*           charCount;
    UILabel* retweetMessage;
    UIButton* retweetFlag;
    UIButton* addFriendButton;
    
    NSString*                   inReplyToStatus;
    sqlite_int64                inReplyToStatusId;
    
    NSString*                   undoBuffer;
    sqlite_int64                savedId;
    
    BOOL                        isDirectMessage;
    BOOL isRetweet;
	
	FriendGroup*				group;
}

@property (nonatomic, retain) NSString* inReplyToStatus;
@property (nonatomic, assign) sqlite_int64 inReplyToStatusId;
@property (nonatomic, assign) BOOL isDirectMessage;
@property (nonatomic, assign) BOOL isRetweet;
@property (nonatomic, retain) FriendGroup* group;
@property (nonatomic, retain) IBOutlet UILabel* retweetMessage;
@property (nonatomic, retain) IBOutlet UIButton* retweetFlag;
@property (nonatomic, retain) IBOutlet UIButton* addFriendButton;

- (IBAction) clear:(id)sender;
- (IBAction) toggleRetweetFlag;

- (void)editDirectMessage:(NSString*)recipient;
- (void)editReply:(Status*)status;
- (void)editPost;
- (void)editRetweet:(Status*)status;
- (void)setCharCount;
- (void)saveTweet;

- (void)editPostGroup:(FriendGroup*)group;
- (void)editDirectMessageGroup:(FriendGroup*)agroup;

@end
